package day12;
import java.util.Scanner;
public class Test02 {
    public static void main(String[] args) {
        try (Scanner scanner = new Scanner(System.in)) {
//            System.out.println("输入数字：");
//            int num = scanner.nextInt();
//            System.out.println("输入分数：");
//            int[] grade = new int[num];
//            for (int i = 0; i < grade.length; i++) {
//                grade[i] = scanner.nextInt();
//            }
//           String[] grades = getGrades(grade);
//            System.out.println("分数对应的等级为：");
//            for (int i = 0; i < grades.length; i++) {
//                System.out.println("分数" + grade[i] + "对应的等级为：" + grades[i]);
//           }
//        }
	        	System.out.println("输入数字：");
	            int num = scanner.nextInt();
	            System.out.println("输入分数：");
	            int[] grade = new int[num];
	            for (int i = 0; i < grade.length; i++) {
	                grade[i] = scanner.nextInt();
	            }
	            System.out.println("分数对应的等级为：");
	            for (int i = 0; i < grade.length; i++) {
	                if (grade[i] > 90) {
	                    System.out.println("分数" + grade[i] + "对应的等级为：A");
	                } else if (grade[i] >= 80) {
	                    System.out.println("分数" + grade[i] + "对应的等级为：B");
	                } else if (grade[i] >= 70) {
	                    System.out.println("分数" + grade[i] + "对应的等级为：C");
	                } else if (grade[i] >= 60) {
	                    System.out.println("分数" + grade[i] + "对应的等级为：D");
	                } else {
	                    System.out.println("分数" + grade[i] + "对应的等级为：E");
	                }
	            }
        }

				//    public static String[] getGrades(int[] scores) {
				//        String[] result = new String[scores.length];
				//        for (int i = 0; i < scores.length; i++) {
				//	      if (scores[i] > 90) {
				//	          result[i] = "A";
				//	      } else if (scores[i] >= 80) {
				//	          result[i] = "B";
				//	      } else if (scores[i] >= 70) {
				//	          result[i] = "C";
				//	      } else if (scores[i] >= 60) {
				//	          result[i] = "D";
				//	      } else {
				//	          result[i] = "E";
				//	      }
				//	    }
				//	    	return result;
				//	    }
	    
	}
}